<?php


namespace app\admin\service;


use app\http\TokenTrait;
use think\facade\Request;

/**
 * 系统日志
 * Trait SystemLog
 * @package app\admin\service
 */
trait SystemLog
{
    use TokenTrait;

    private static function log($data = null)
    {
        $data['create_time'] = time();
        $data['maker'] = self::getUId();
        $data['ip'] = Request::ip();
        $data['equipment'] = Request::header('User-Agent');
        \app\admin\model\Log::create($data);
    }
}
